<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.3.1.js"></script>
    <script>
        $(f);

        // append
        // prepend
        // before
        // after
        function f(){
           // $("div").after($("<span>4</span>"));
            $("div").remove();// 自杀
        }
    </script>
</head>
<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    </div>
</body>
</html>